<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>规格列表</title>

<link rel="stylesheet" type="text/css" href="<?php echo asset_url('js/bootstrap/css/bootstrap.min.css');?>" />
<link rel="stylesheet" type="text/css" href="<?php echo asset_url('js/bootstrap/css/bootstrap-responsive.min.css');?>" />
<script type="text/javascript" src="<?php echo asset_url('js/jquery/jquery.js');?>"></script>

<link rel="stylesheet" type="text/css" href="<?php echo theme_url('css/common.css');?>" />
<script type="text/javascript" src="<?php echo theme_url('js/common.js');?>"></script>

<script type="text/javascript">
	$(document).ready(function(){

	});
</script>

</head>
<body>

	<?php echo widget('admin/header');?>

	<div id="wrap" class="container">
		
		<div class="btn-toolbar">
			<div class="btn-group">
				<a href="<?php echo admin_url('specification/insert');?>" class="btn">添加规格</a>
			</div>
			<div class="btn-group">
				<button class="btn dropdown-toggle" data-toggle="dropdown">导出 <span class="caret"></span></button>
				<ul class="dropdown-menu">
					<li><a href="<?php echo admin_url('specification/export', array('type' => 'excel'));?>">EXCEL</a></li>
					<li><a href="<?php echo admin_url('specification/export', array('type' => 'txt'));?>">文本</a></li>
				</ul>
			</div>
		</div>

		<table class="table table-bordered">
			<tr>
				<th width="150">ID</th>
				<th>名称</th>
				<th width="50">类型</th>
				<th width="100">显示方式</th>
				<th width="400">规格值</th>
				<th width="200">操作</th>
			</tr>
			<?php foreach ($list as $row) {?>
			<tr class="t_center">
				<td><?php echo $row['id'];?></td>
				<td><a href="<?php echo admin_url('brand/update', array('id'=>$row['id']))?>"><?php echo $row['name'];?></a></td>
				<td><?php echo $row['type'] == 1 ? '文字' : '图片';?></td>
				<td><?php echo $row['show'] == 1 ? '横排列表' : '下拉列表';?></td>
				<td><?php echo $row['data'];?></td>
				<td>
					<a href="<?php echo admin_url('brand/update', array('id'=>$row['id']))?>">修改</a>
					<a href="<?php echo admin_url('brand/delete', array('id'=>$row['id']));?>" onclick="return false;" class="delete">删除</a>
				</td>
			</tr>
			<?php }?>
		</table>
		
		<div class="pager">
			共条<?php echo $page->rows();?>记录
			<?php echo $page->first();?>
			<?php echo $page->index();?>
			<?php echo $page->last();?>
		</div>
		
	</div>

	<?php echo widget('admin/footer');?>

</body>
</html>